Solved

Run external Program

Posted on 1998-04-14
2
1,430 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
Comment Utility
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
Comment Utility
>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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Best tools for Backup and restore of Wordpress site 6 53
sum67 challenge 35 88
Change to event 1 72
Making an alias 7 51
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

8 Experts available now in Live!

Get 1:1 Help Now