necpp icon indicating copy to clipboard operation
necpp copied to clipboard

Attempting to Translate to Mac Xcode

Open KGx55 opened this issue 7 months ago • 2 comments

I am attempting to translate the program to C++ for Xcode. Am thinking it should be relatively simple because it is a console program and there is no need to be concerned about graphics.
I created an .xcodeproj file and started a project by pasting example/test_cpp.cpp into main(). I added all the .h files that are in the src folder. I expect errors and will need to work my way through them as they come up. On the first attempt, I got an error that there is no config.h file. I included the config.h file from the win32/nec2++ folder.
Now the compile returns a series of undefined symbol errors. Below are the first four.

Undefined symbols for architecture x86_64: "c_geometry::wire(int, int, double, double, double, double, double, double, double, double, double)", referenced from: _main in main. "nec_context::initialize()", referenced from:_main in main.o "nec_context::geometry_complete(int)", referenced from:_main in main.o "nec_context::ex_card(excitation_type, int, int, int, double, double, double, double, double, double)", referenced from: _main in main.o

Since the .h files are included, it is a puzzle as to how to track down the problem.

One way to resolve issues is to build in a series of small steps that allow me to isolate problems. Are there suggestions on how to reconstruct this in small steps?

KGx55 avatar Jun 03 '25 01:06 KGx55