Solved

Run external Program

Posted on 1998-04-14
2
1,458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

630 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