- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a legacy project involving a mix of fortran and C++ which uses a GUI. There is no main program in either the fortran or C++. When I try to use the C++ from the Base Toolkit, an error occurs, at link time, saying it can't resolve the external reference to __MAIN_. This is because there is, and never was, a main program in this code. I am building using Visual Studio 2019. This error was not occuring until I installed the Base Toolkit. How can I get around this error and get my project built?
When someone responds, can you send me an Email using 'blakemitchell636@gmail.com'
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Blake1,
Thanks for reaching out to us.
Could you please provide us with a sample reproducer and the steps you have followed so that we can try it at our end?
Also please do let us know the compiler being used to build the project.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What in the world is a sample reproducer??? I have worked in this industry for 40+ years and I have never
heard of such a thing?!?!? This application consists of about 375 files containing almost 2 1/2 million lines of code. It DOES NOT belong to me, but the company for which I work. It is proprietary to the company and I
can NOT provide it to anyone! I have put together a project using Visual Studio 2019 with intel oneAPI installed. The fortran compiler is installed and the oneAPI base toolkit which has the C++ and DPC++ compilers in it. The application does not have a main program. When I compile it, the compile works fine, but when it tries to link, I get an unresolved external error which says it can not find the __MAIN_. When I try to add a main program, it builds a .exe file, but it will start and then immediately shut down as the main is a dummy which doesn't do anything. I don't know how to explain it better than that!!! If you can't understand this simple explanation, then I need to get help from someone else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>What in the world is a sample reproducer???
Apologies for any confusion.
We mean to ask you to isolate the issue with a small code so that it would help us to understand how your code works.
Could you please let us know how your code got worked even without the main?
Also please let us know the compiler being used before and after installation of oneAPI Base toolkit.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Blake1,
Could you please try to build your program by making the below changes in visual studio configuration properties?
>>Open Project configuration properties.
>>Go to Linker -> System
>> Change Subsystem to Windows (/SUBSYSTEM: WINDOWS)
Please let us know if you still face any issues.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Blake1,
We haven't heard back from you. Could you please provide an update on your issue?
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you, so we will close this inquiry now. If you need further assistance, please post a new question.
Thanks & Regards,
Noorjahan.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page