Menu

Undefined symbol: main /apps/workshop6_u1/WS6

Help
2008-05-06
2013-04-22
  • Surfingpilot

    Surfingpilot - 2008-05-06

    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.

     
    • Andre Pinto

      Andre Pinto - 2008-05-07

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.