Solved

Run external Program

Posted on 1998-04-14
2
1,435 Views
Last Modified: 2013-11-20
Dear
         
       WinExec("cl.exe",SW_SHOWNORMAL);
        I run cl (SDK) program in a MFC program
       When I complie the MFC program, it runs cl        automatically, before linking.
       And it doesn't allow linkng.
     
      What is the program  
0
Comment
Question by:logout
2 Comments
 
LVL 3

Expert Comment

by:byang
ID: 1317737
Let's see if I understand you correctly.

If cl is the compiler, I assume when you compile the MFC program, either you or the IDE will run it, right ? Nothing wrong with that.

Can't link ? What's the error message ?

None of the above has anything to do with how you run cl from within your MFC program, whether you use WinExec() or not.

0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 20 total points
ID: 1317738
>Dear

Dear dear        

>WinExec("cl.exe",SW_SHOWNORMAL);

This looks fine (but for Win95/NT you should really use CreateProcess)

>I run cl (SDK) program in a MFC program

The line above would run the cl.exe program assuming that it is on the program path or current directoy.

Your reference to (SDK) doesn't seem to amke sense, cl is not an SDK program, it is a tool (compiler) that is part of VC.

>When I complie the MFC program, it runs cl automatically, before linking.

Now you're not making sense.  Compiling the MFC program won't run it.  Your WinExec will not happen until you have compiled and linked the program and then run it.

Of course compiling the program will result in cl.exe running because it is the compiler program.  But that is not related to you having the WinExec call in your program source.

>And it doesn't allow linkng.
     
The linker won't run unless you build the entire project, compiling a single source file won't make it link.

>What is the program

Do you want to know the name of the linker program?  It is link.exe

Are you trying to make your own IDE-like environment to compile and link programs?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 89
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 89
isEverywhere  challenge 19 72
mapBully challenge 6 114
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

24 Experts available now in Live!

Get 1:1 Help Now