Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9249613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:14:27+00:00 2026-06-18T10:14:27+00:00

I am using Eclipse Juno updated as two days ago, fresh install and installed

  • 0

I am using Eclipse Juno updated as two days ago, fresh install and installed C/C++ and linked MinGW into Windows (7 64-bit by the way). Everything works fine, i can build/compile “Hello World” and execute the file generated by eclipse.

Now i have three files,
main.cpp:

#include "functions.cpp"
#include <iostream>
using namespace std;
int main(int){
    int a = mult(20,5);
    cout << "Twenty times 5 is " << a;
    cout << a << "Plus 2 is " << add2(a);
    return 0;
}

functions.cpp:

#include "header.h"
int EXPORT  add2(int num){
  return num + 2;
}
int EXPORT  mult(int num1, int num2){
  int product;
  product = num1 * num2;
  return product;
}

header.h:

#ifndef HEADER_H_
#define HEADER_H_
#ifdef BUILD_DLL
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __declspec(dllimport)
#endif
int EXPORT add2(int num);
int EXPORT mult(int num1, int num2);
#endif /* HEADER_H_ */

With this set up in the code i need a DLL file to be generated first and then used when building. If i place these files on my desktop for instance, i can /cd desktop and use this command:

g++ functions.cpp -o functions.dll -DBUILD_DLL -shared -Wl,--out-implib,libfunctions.dll.a

This creates a DLL file and also a .A File, one dynamic one static.

IN SHORT MY QUESTION:

Can i get Eclipse to make a DLL file from functions.cpp before it attempts to build my code into a .exe file? At this stage my code is looking for an DLL file to IMPORT.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:14:28+00:00Added an answer on June 18, 2026 at 10:14 am

    I found out how to do this. It may not be the best option for this, however i was able to go to my project Properties–>C/C++ Build—>Settings—>Build Steps.

    Screenshot of Build Steps tab with code.

    This seems to work however I am now trying to find a way to set the command to use the source directory of the project instead of me having to use C:/eclipse/workplace etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Eclipse Juno on Windows. After struggling with Git a little bit, this is
I'm using Eclipse Juno for c/c++ under Windows 7. I've created a shared library
I haven't found one to install Eclipse 4.2 Juno. Default Ubuntu repositories (I'm using
I'm using Ubuntu 12.04, and to install Eclipse Juno I downloaded it from the
I just started using the new Eclipse 4.2 (Juno) Null Analysis. On code like
When using Eclipse over X-Windows on a remote shell (X port forwarding), is there
I am using Eclipse Juno (4.2.1) with SVN Kit 1.7.5.v1, Subversion SVN connection 3.0.0.20121013-170.
I'm using Eclipse Juno, Tomcat 7. I cannot add my project to the server,
I'm using Eclipse juno and osx 10.8 . I have java 7 with eclipse
When creating an RCP application using Eclipse Juno (e4 platform), view parts do not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.