in reply to External (extra) files when using Inline::CPP
Then create a static library (named, say, libxkcd.a) from the generated xkcd.o:g++ -c xkcd.cpp
Then before the "use Inline CPP;" line in test.pl I inserted:ar -rc libxkcd.a xkcd.o
The "BUILD_NOISY" directive just allows you to see the compilation during the initial run.use Inline CPP => Config => BUILD_NOISY => 1, INC => '-ID:/w/xkcd', LIBS => '-LD:/w/xkcd -lxkcd', ;
I think it might be important that there's an empty line or 2 at the bottom of all three test.pl, xkcd.h and xkcd.cpp files.Perfect random number: 4 Perfect random number: 4 Perfect random number: 4
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: External (extra) files when using Inline::CPP
by cavac (Prior) on Apr 16, 2024 at 12:01 UTC | |
by syphilis (Archbishop) on Apr 17, 2024 at 00:36 UTC | |
by swl (Prior) on Apr 17, 2024 at 04:11 UTC | |
by syphilis (Archbishop) on Apr 17, 2024 at 12:39 UTC | |
by cavac (Prior) on Apr 18, 2024 at 06:00 UTC | |
Re^2: External (extra) files when using Inline::CPP
by marioroy (Prior) on Apr 16, 2024 at 21:03 UTC |