Linking taskvine with c++

10 views
Skip to first unread message

sprock

unread,
Jul 6, 2023, 8:38:13 AM7/6/23
to Cooperative Computing Tools
Hello,

I have a tasvine application written in c++.  taskvine.h is enclosed in extern "C" {} and I build like this:

${CXX:-g++10}  -o farmfarms \
     -I${HOME}/.local/cctools/include/cctools \
     -L${HOME}/.local/cctools/lib -ltaskvine -ldttools \
     -Lutilities -lutilities \
     -lm -lz -lcrypto -lssl

The build succeeds but when I run the application I get:
Usage:
./farmfarms input-file [output-file]
2023/07/06 07:46:47.00 [94474] fatal: ARGC 1: (null)

However I have a usage message in main().  So the  usage message I see must be from somewhere else.  I'm no c/c++ expert, but this smells like a linking issue.

Does anyone have any ideas on how to fix this?

Thanks,
Roger

Colin Thomas

unread,
Jul 6, 2023, 11:05:20 AM7/6/23
to Cooperative Computing Tools
Hello Roger,

It looks like your build command is missing your own application file which should supply a main function. It happens to pull in a main function from libdttools and is giving you the output of one of our utility programs. I reproduced the error and was able to build and run successfully when I included my own source file.

Let us know if the problem persists, and if you have any further questions or feedback. We'd be interested in hearing about your application.

Thanks,
Colin

Roger Mason

unread,
Jul 6, 2023, 12:00:18 PM7/6/23
to cctoo...@googlegroups.com
Hello Colin,

"'Colin Thomas' via Cooperative Computing Tools" <cctoo...@googlegroups.com> writes:

> It looks like your build command is missing your own application file
> which should supply a main function. It happens to pull in a main
> function from libdttools and is giving you the output of one of our
> utility programs. I reproduced the error and was able to build and run
> successfully when I included my own source file.

Duh! Too much late night/early morning coding.

I will write separately in the next day or so about my application.

Many thanks,
Roger
Reply all
Reply to author
Forward
0 new messages