- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
I'm brand new to fortran. For starters, I did not write the code I am trying to compile. I'm trying to use an fparser that I downloaded from source code. Whenever I try to compile the program, I get this error message:
Undefined symbols for architecture x86_64:
"_MAIN__", referenced from:
_main in for_main.o
ld: symbol(s) not found for architecture x86_64
I am unsure of what this means, and what I can do to solve the problem. From my google searches, it sounded like it was an issues with 32bit and 64bit compatibility, but when I ran the compiler with the "ia32" option, I still had the same error. I tried running the compiler both on Windows 11 and MacOS Monterrey with no luck. Does anyone know what I should do?
Also, where should I look in the future to solve an issue like this myself?
Thank you for helping a struggling grad student! Please be kind. I'm very new.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message says that you asked to build a complete program, but what you supplied were only callable procedures, not a main program to use the procedures (subroutines or functions). I don't know if this parser is meant to be a standalone program. Perhaps there are multiple source files you have to build together to form a complete program.
Andrew's advice I think is the wrong direction, as the messages you list indicate that it did try to build a console program.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You possibly have the wrong project type in the settings. If you have a "PROGRAM" statement for a main program it will be a console project type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message says that you asked to build a complete program, but what you supplied were only callable procedures, not a main program to use the procedures (subroutines or functions). I don't know if this parser is meant to be a standalone program. Perhaps there are multiple source files you have to build together to form a complete program.
Andrew's advice I think is the wrong direction, as the messages you list indicate that it did try to build a console program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey All! I have the program up and running now. I can't thank both of you enough. I just needed to link the parser file to the program file during compiling. I clearly have a lot more to learn

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page