Hi, well I have written something that compiles and runs fine with a different compiler, but when trying to use a g++ compiler, I get errors when compiling in a unix environment.

Here is the command line I have used:

g++ Agent.h Agent.cpp Driver.C
g++: Compilation of header file requested.

Not sure what else is needed. In the driver file, "Driver.C" I have #include "Agent.h"
Thanks for any help.

Recommended Answers

All 2 Replies

You don't include header files in the compile line...It should be

g++ Agent.cpp -o Agent

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.