How to compile cpp files from within C++ Builder IDE

Posted on 2004-11-11
Last Modified: 2013-11-17
I got some cpp sample files from tutorials for c++ builder. I opened a new project "console wizard", paste the source code, I compile it => ok, but if i try to run it it gives me a linker error. The funny thing is that if i compile the same code with the compiler in command line it is ok, and it creates the exe file. The error i get is from the line: hBmp=(HBITMAP)LoadImage(NULL,MAKEINTRESOURCE(OBM_CHECK),IMAGE_BITMAP,0,0,LR_SHARED); and the linker says: [C++ Error] Unit1.cpp(213): E2451 Undefined symbol 'OBM_CHECK' ....well i did some diging on my one and i found out that OBM_CHECK IS A CONSTANT IN WINUSER.H ... if i include this file as well ... the linker will produce other errors.

My question: If I have a simple cpp source code what should I do in order to compile it from within the IDE ?
Question by:RBWorks
    1 Comment
    LVL 11

    Accepted Solution

    I cannot remember of the top of my head but to compile windows programs you have to include

    #pragma I cant remember the argument

    I'll try find some of my old code.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now