Need another pair of eyes to look at this to see if I am doing something stupid. I have found a number a libraries where a GLOB main is definded but I haven't found one that makes sense to link in given what I am attempting to build.
And I shouldn't need a main in my cppunit class file as far as I know. Caveat is that I am new to cppunit and I am attempting to build in my companies build environment.
Can anyone offer some incite to this problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just to clean my mind, did you refer the lib in your project? Which environment are you in? Please pass a piece of your code to identify the problem ! =D
You don't need a main class? If you just want to compile this by itself to get an object file, use the -c command-line option, otherwise the compiler thinks you are going to make an executable. The executable must have a main() function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am attempting to build a cppunit binary in my develpment environment and I am getting error:
Undefined first referenced
symbol in file
main /apps/workshop6_u1/WS6U1/lib/crt1.o
My compile output is:
/bin/rm -f cppunit_sl.c
/apps/workshop6_u1/bin/CC -c -DTHREAD_FLAG=1 -DRW_MULTI_THREAD -D_REENTRANT -mt -D_RWBUILDSHARED -KPIC -DRW_NO_STL -library=iostream -w -g -DDEBUG -DDEBUG_QUERY -DSOLARIS -DDBG_ON -I/apps/workshop6_u1/WS6U1/include/CC4 -I. -I/apps/fu/section20/11.2/dev/include -I/apps/fu/section20/vendorLib/EMS/4.2/include -I/fu/cmib/build4.0/include -I/apps/sybase/include -I/apps/rogue_wave_sol7/workspaces/workshop6_u1/4d -I/usr/openwin/include -I/apps/tips/include -I/fu/AIS/build5.1/include -I/apps/neuron/v4.1/include -I/home/a487891/cppunit/cppunit-1.10.2/include TestDatalinkTradeRouter.C
echo "static const char * const cppunit_sl = \"@(#) cppunit.sl \";" > cppunit_sl.c
/apps/workshop6_u1/bin/cc -c -pic cppunit_sl.c
/apps/workshop6_u1/bin/CC TestDatalinkTradeRouter.o cppunit_sl.o -Bdynamic -lintl -lw -lnsl -mt -L. -library=iostream -L/apps/fu/section20/11.2/dev/lib -L/apps/workshop6_u1/WS6U1/lib -L/apps/fu/section20/vendorLib/EMS/4.2/lib -L/apps/ppds/dev/bin/ac/5.3/lib -L/apps/neuron/v4.1/lib -L/fu/AIS/build5.1/lib -L/fu/cmib/build4.0/lib -L/apps/rogue_wave_sol7/workspaces/workshop6_u1/4d/lib -ldbt4d -liostream -mt -L/apps/tips/lib -L/apps/sybase/lib -L/usr/openwin/lib -lcrypto -llber -lldap -lssl -ltibems -ltibemslookup -ltibiconv -ltibjms -lxml2 -lz -L/apps/rogue_wave_sol7/workspaces/workshop6_u1/4d/lib -Bdynamic -lmth4d -ltls4d -o TestDatalinkTradeRouter
Undefined first referenced
symbol in file
main /apps/workshop6_u1/WS6U1/lib/crt1.o
ld: fatal: Symbol referencing errors. No output written to TestDatalinkTradeRouter
*** Error code 1
make: Warning: Target `all' not remade because of errors
Need another pair of eyes to look at this to see if I am doing something stupid. I have found a number a libraries where a GLOB main is definded but I haven't found one that makes sense to link in given what I am attempting to build.
And I shouldn't need a main in my cppunit class file as far as I know. Caveat is that I am new to cppunit and I am attempting to build in my companies build environment.
Can anyone offer some incite to this problem.
Just to clean my mind, did you refer the lib in your project? Which environment are you in? Please pass a piece of your code to identify the problem ! =D
You don't need a main class? If you just want to compile this by itself to get an object file, use the -c command-line option, otherwise the compiler thinks you are going to make an executable. The executable must have a main() function.