Board index » cppbuilder » newbie question ..
Stan
![]() CBuilder Developer |
Stan
![]() CBuilder Developer |
newbie question ..2004-11-21 11:07:15 PM cppbuilder71 a newbie question. When i build following project: #include <iostream> using namespace std ; int main() { return 0; } cppbuilder reports a fatal error message -- [Linker Fatal Error] Fatal: Expected a file name: what's the problem? thx. |
Ed Mulroy [TeamB]
![]() CBuilder Developer |
2004-11-21 11:20:28 PM
Re:newbie question ..
Look at the names in the path to where the compiler
is installed and to where the source file is located. If there is a '+' (or a '++') in one or more of the names then it could cause this problem. A '+' is command in a Windows command line. The command interpreter sees it as a file concatination symbol, a separator between file names. The solution is to install the compiler into a path that has no '+' characters. An example of how it sees '+' as a concatination symbol: copy 1.cpp+2.cpp 3.cpp The '+' is a separator and the 2.cpp will be seen as another file name and '3.cpp' will be assembled from the other two files . Ed QuoteStan wrote: |
Liz Albin
![]() CBuilder Developer |
2004-11-22 12:11:10 AM
Re:newbie question ..
On 21 Nov 2004 08:07:15 -0700, Stan wrote:
Quote
good luck, liz {smallsort} |
Stan
![]() CBuilder Developer |
2004-11-26 09:13:11 PM
Re:newbie question ..
Thanks.
I've gotten rid of the mentioned problem. But now new error messages appears: [Linker Error] Unresolved external '__InitVCL' referenced from D:\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl [Linker Error] Unresolved external '__ExitVCL' referenced from D:\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl [Linker Error] Unresolved external 'WinMain' referenced from D:\BORLAND\CBUILDER6\LIB\C0W32.OBJ Can i get help again? Regards, Stan "Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote: Quote
|
Ed Mulroy [TeamB]
![]() CBuilder Developer |
2004-11-26 10:19:35 PM
Re:newbie question ..QuoteBut now new error messages appears: ------------ #include <iostream> using namespace std ; int main() { return 0; } ------------ Sources of the errors: 1-The program is a Windows Console mode program but the project is configured to be a GUI program. Console Mode This is a text mode program and presents a text window to the user. Its output resembles that of a DOS or Unix program. The program is written to start at the function 'main'. GUI GUI stands for Graphical User Interface, the type of user display one thinks of as normal for Windows. Output to the user is in the graphical display. The program is written to start at the functon 'WinMain'. 2-The project is configured to use the VCL but your program is not. VCL VCL stands for Visual Control Library, a class library provided with C++ Builder which provides a massive number of features and which is integrated into the RAD or Rapid Application Development design system in C++ Builder. For the most part what the VCL provides addresses GUI programs and not Console mode programs. How to fix the problem: You need to create a new project. When you created your project you did something like File|New which created a project for GUI mode using VCL. That is the most common type of program people using C++ Builder wish to create Windows so it is the default type. To create a Console Mode program, select File|New|Other (File|New in older versions of C++ Builder), and a project type window will open showing icons for the various types of project that can be created. Double click on the icon labeled 'Console Wizard'. A dialog will appear which allows you to configure the project. What is in that dialog varies with compiler version and you have not mentioned what version you are using, so either un-check GUI or check Console. Un-check VCL. . Ed QuoteStan wrote: |