Hi,
I’m newly trying to use the Momentic’s IDE workspace to edit and compile in after having used Photon/shell development for years but I’m having a problem building a library.
My system consists of:
Momentics IDE, SP2 installed on XP Pro
QNX 6.3 SP2 target machine.
The QNX drive mounted via Samba as a Windows drive so the IDE can see the makefile/source code which resides on the QNX machine.
Now when I go to photon from a shell I can run ‘make clean’ followed by ‘make’ and it builds my exe without any trouble (compiles, builds libraries and links).
However, from the IDE it fails. It does the ‘make clean’ fine and then compiles everything OK including doing all the recursive make calls, directory changes, file copies etc but fails to generate libraries and so it fails the link phase.
This is the line in the makefile that is being executed (I am building a library)
ar crv objects/common.a objects/Logger.o objects/Mutex.o objects/Thread.o objects/Timer.o
This is the error the IDE generates
invalid OMF record length 19525
invalid OMF record length 19525
invalid OMF record
invalid OMF record length 19525
invalid OMF record length 19525
invalid OMF record
repeated a few more times for each .o file.
So it looks to me like my .o files are being generated incorrectly by the Momentics IDE compiler (wrong format maybe???)
When I compiled under QNX and I do an ls -l on Logger.o I get a file size of 205392
When I compiled under Momentics IDE and I do an ls -l on Logger.o I get a file size of 206884
This looks like there is some kind of fundamental file format problem (the compiler version/options are specified in the Makefile itself as GCC 3.3.5 so unless Momentics adds something on it’s own to a standard ‘make all’ command I don’t know why they are different). This is troubling because it makes me think if later on I build 1/2 the files under Momentics IDE and 1/2 under QNX shell environment they may not link properly or may have other problems of different sizes of objects at run time (anyone know if this is true?).
My Make target under the IDE is just target name of ‘all’ and I use a make target of ‘all’ with the default setting.
Could it be because the ‘ar’ command is different under the Windows install of IDE than the native one on QNX 6.3?
I created my project under Momentics as a ‘standard Make C/C++ project’ since I already had existing code and make environment and then pointed the path to the code on the QNX drive.
My ‘Set QNX Build environment’ is GNU 3.3.5 compiler, C++ Dunkum with exceptions, x86 and I didn’t do anything with the environment settings (maybe something here?).
My makefile CC/CFLAGS like looks like:
CC = qcc -V3.3.5,gcc_ntox86_cpp
CFLAGS = -lang-c++ -D_PTHREADS=1 -g -w8 -Wall -Werror -Wno-deprecated -Wp,-MD
this gets read by the Momentics IDE and make on the QNX box (the both issue the exact same compile lines) and neither complains so it should be using the same compiler and header files etc which is why the size of the objects being different worries me…
Anyone else experienced anything like this trying to build a library under using the IDE?
TIA,
Tim