Cannot compile source file with Ctrl-F7 in VS 2008

I have added an existing .cpp file to my project.  When I want to compile
only one file, I usually press Ctrl-F7, but that does not work on this file (it works on some other source files).  When I pull down the Build menu, the Compile option is missing, like it is when a header
(*.h) file is active.
When I right-click on the source file in the Solution Explorer, the context menu shows "Compile\tCtrl+F7"; I can compile a single source file that way, but Ctrl-F7 is so much easier and faster.
I have tried resetting the keyboard shortcut, resetting the profile to the original C/C++ profile, and closing and reopening Visual Studio, but nothing corrected the issue.
It feels like VS is not recognizing that my source file is a C++ file, despite its name (something.cpp).  Why has this started happening, and how can I get the shortcut (and Build menu) to reset?

This happens in the following way.  You manually create a new C++ class in an existing project using the editor in VC++.  You then (with the editor still open) add the file to your project.  Visual Studio finds your class info
and adds it intellisense, making it seem as though VC++ knows your file is in the project.  However, it does not and ctrl f7 will therefore not work.  Removing and adding the file does not help...unless you close the editor window...in which
case VC++ will correctly add the file if you remove and add it to your project.
This is not an uncommon way to create a new class - one does not always use the VC++ create class option.  The manual creation method may be preferable if you are not using automated features from VC++ and instead want to copy some code
from another file, headers for example.   My view is that this is a VC++ bug that should be repaired; apparently VC++ thinks the file is already included if it is open in the editor rather than checking its file list.  But it is easy
to work around once you know what is happening.

Similar Messages

  • Problem compiling source file in package

    Hi, I have 5 source files which I have just packaged together and put in the same sub-directory, the problem is that when I try to compile the file with the main method I get the error message:"cannot read" then the name of the source file. I am compiling from the command line and setting the classpath as I compile with the statement:
    c:\j2sdk1.4.1\bin>javac -classpath c:\directory\package directory source file.java
    I'm not sure what I am doing wrong and the source files all compiled fine before I added the package statement to the files. Please any help would really be appreciated.

    It sounds like the java file your are trying to compile is not in the directory you are compiling from.
    Is this basically what you are doing?:
    Say the package name is mypackage.
    Assume we are O.K. with keeping source and class files together.
    Create a directory named 'mypackage' somewhere...C:\mypackage\.
    Put all the .java files in it (these .java files indicate that they are a member of the 'mypackage' package).
    At a command prompt, cd to the directory containing the 'mypackage' directory...'cd C:\'
    Compile the source files: C:\j2sdk1.4.1\bin\javac mypackage\*.java
    run the main class: C:\j2sdk1.4.1\bin\java mypackage.TheMainClass
    Basically, this says keep the files where you want them and point to javac, instead of moving everything under java/bin. btw it will save a lot of typing if you add java/bin to your PATH.
    Hope this helps.

  • Sccm 2012 r2 error setup cannot compile mof file tasksequenceprovider.mof

    Am getting this error during SCCM 2012 R2 installation on the same server which has SQL 2012 with SP1. "setup cannot compile mof file tasksequenceprovider.mof". Any help?

    Hi,
    The following blog introduced a tool scans winodws module which may help find out the missing file.
    http://blogs.technet.com/b/configurationmgr/archive/2010/01/05/the-configuration-manager-service-pack-install-guide.aspx

  • Cannot open source file

    I just downloaded some new drum sounds on Logic Pro X that were offered upgrades and now I get an error message in my regular work that states,
    "Cannot open source file"  when I go to import an mp3 large file into any template or new project.
    I've trashed preferences and have plenty of room to import the large files I usually work with. 
    Need guidance please.

    Thanks Pancenter, that helped.  I still hear a slight difference in the tone of voice speaking in a 48k session also.
    Do you think this is the difference of being recorded at 44.1 mp3, then change to m4a and export the now 48k file into a 48k Logic session? I didn't see a way of changing Quicktime Player sample rate to 44.1, which is preferred in this instance. Future recordings I can set up at 48k but I have a bunch of files at 44.1 waiting for me that need a solution first.
    Whew, and yes what a pain to do this when it worked fine before. (although for my work, I would prefer to edit as mp3 instead of turning into AIF then mp3 again- too much giggage wasted for this use)
    Still open to other solutions without undoing the new sounds & such I just upgraded.

  • Utility for compiling java files with options.

    i want to create a utility application in java which can compile a java source file with options like -d , -classpath,-help etc.
    there is a java.lang.Compiler class which can be used to compile a source file but how can i supply compile time options?
    help.

    Welcome to the forum!
    >
    i want to create a utility application in java which can compile a java source file with options like -d , -classpath,-help etc.
    there is a java.lang.Compiler class which can be used to compile a source file but how can i supply compile time options?
    >
    Is this an interview question? An intellectual exercise to see if you can do it?
    Why do you want to do this when there is already a freely available utility, javac, that can already do all of that?
    Please provide more information and a sample user session that shows what you are really trying to accomplish.
    And the class you mentioned is not really for the purpose you say you want
    >
    The Compiler class is provided to support Java-to-native-code compilers and related services. By design, the Compiler class does nothing; it serves as a placeholder for a JIT compiler implementation.

  • Cannot compile Java files or create Java Project

    Hi,
    I cannot compile java files and also didn't see any option
    for creating java project using flex 2 builder.
    Actually am trying to create a FDS project with an option to
    compile on the server. I am using Weblogic 8.1 SP5 as my server.
    thank you
    sun

    hi
    this is may jvm.config file. Can anyone tell me if it is
    right because all the fields are blank.
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) JAVA_HOME environment variables (same rules as java.home
    above)
    # 2) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 3) ../jre
    # 4) registry (windows only)
    java.home=C:\Adobe\Flex Builder 2.0 Beta 3\Flex SDK 2.0\jre
    # Arguments to VM
    java.args=-ea -Xmx384m
    # Environment variables we care about, whitespace-separated
    env=
    # java.class.path - use this for adding individual jars or
    # directories. When directories are included they will be
    searched
    # for jars and zips and they will be added to the classpath
    (in
    # addition to the directory itself), the jar to be used in
    launching
    # will be appended to this classpath
    java.class.path=C:\Adobe\Flex Builder 2.0 Beta 3\Flex SDK
    2.0\jre
    # where to find shared libraries, again use commas to
    separate entries
    java.library.path=
    thanks
    sun

  • Read Document in FileUtilities  cannot search a file with french character in the file name

    Hi,
    I am trying to search a file with french character in the file name like 'captures écran.doc' in my unix server directory, and Write the file somewhere, say in a list of documents or, write on file system to another directory.
    I am using to Read Document in FileUtilities of Foundation, but it cannot read the file due to french character in its name. Although it can find any other file name without these french characters.
    Tried renaming but that also cannot find the file with french character name.
    Please provide any idea to solve it using LC operation.
    Regards,
    Rohan Raj.

    Hi Thomas,
    Thanks for the post, but I have already found a solution to it a month ago. Sorry for not posting the solution.
    You just have to set the '-Djava.property.file.encoding=ISO8859-1' into JVM argument of your server startup, and bounce the server back to pick the new JVM arg set. And now the service Read Document in FileUtilities of Foundation will read all french characters.
    ISO8859-1refers to "Latin alphabet no. 1," consisting of 191 characters from the Latin script. This character-encoding scheme is used throughout The Americas,Western Europe, Oceania, and much of Africa. It is also commonly used in most standard romanizations of East-Asian languages.
    regards,
    Rohan Raj.

  • Cannot open PDF files with Reader XI message appears Adobe Reader has stopped working

    Cannot open PDF files with Reader XI message appears Adobe Reader has stopped working. A problem has caused the program to stop working

    Which Operating system you are using?
    Can you open Adobe Reader by itself?  If so, try disabling Protected Mode [Edit | Preferences | Security (Enhanced)] and then try to open the file.

  • Archive Source Files with Errors, Option Does not work

    Any one tried "Archive Source Files with Errors" on the
    sender adapter. It shows no effect.
    1.We are on SP19.
    2.Adapter type : FTP adapter.
    Steps for the Reconstruction 
    1. Configure a sender FTP adapter.
    2. choose the option "Archive Faulty source files"
    3. Specify a directory for "Directory for archiving Files with Erroors"
    4. Send a file which can cause File Content conversion errors.
    Regards,
    Raj

    Hi,
    FYI
    I am in PI 7.0 SP 10. It works fine for me. Whenever you have any content conversion problem or module problem, it has created the same input file in specified directory.
    In your case are u getting content conversion error in the Communication Channel ..just cross check it. If not try to get error over there and then test this feature
    Rgds,
    Moorthy

  • Archive Source Files with Errors

    Hi All,
    I need to archive my sending file in repective directory, if it has errors..
    It is mentioned in library that A permanent error occurs either during the conversion of the file content, or in a module in the module processor.
    What is permanent error?
    For example if my input file name is abc.txt which containg 3 fields id,name,address.
    i have configured sending file adapter with FCC .
    now i have given some faulty entries in abc.txt like for example 4 fields separated by comma,
    but this is a error.Asper FCC i have given only 3 fields..
    so this error file has to archive in so and so folder.
    If i check <b>Archive Source Files with Errors</b> parameter in sending file adapter.
    and specified the specified directory.
    but its not working for me. file is not picking but its not coming in the archive folder.
    In library it is mentioned to see message transfer bean link.
    there i found <b>Transform.PermanentErrors: True/False</b>.
    If we have not used message transfer bean then, in that case will this parameter <b>archive source files with errors</b> will work for FCC?
    Please suggest me .
    I would really appreciate if anyone could send a complete blog for this how to archive source files with errors in FCC?
    Thanks in Advance..
    Regards,
    Reehan

    Reehan,
    I am not sure if you are still stuck with your issue of archiving faulty source files but I came across the same issue. Please check your mode of processing. The faulty source files archiving feature will work good in ARCHIVE mode but not in test or delete mode. I haven't check for set for read-only mode.
    Good luck!

  • Use of "Archive Source Files with Errors" for BIC module error

    Hi All,
    I have Edi file to Idoc scenario , where i am using SEEBURGER BICXIADAPTER.MODULE.
    My question is if the input file caught in error with BIC Module e.g
    "MP: exception caught with cause Error in BICMODULE-module:Temporary error: BIC XI Adapter call failed. Reason: SegmentDescription: checkAndResetChildrenCounter() not enough repetitions of the segment UNH found: 0 instead of 1 offset :80 DESCRIPTION: SegmentDescription Warning: Not enough repetitions of the segment UNH ([not specified]/[not specified])."
    can we move these errornous files to another directory using Processing parameter  "Archive Source Files with Errors" available with Sender File Adapter?
    In File Adpater my Module tab looks like :
    1     localejbs/CallBicXIRaBean     Local Enterprise Bean     bic
    2     localejbs/CallSapAdapter     Local Enterprise Bean     0
    In my scenario  , its not working..  do we have any other option to achive this?

    Hi Jyoti,
    I had a raised a similar case with SAP and came to know that archiving only works if the error raised by the module is so called "Permanent". However, bic doesn't raise permanent error due to which archiving of error files won't be possible. Seeburger haven't came up with a solution yet.
    Regards,
    Prateek

  • "Archive Source Files with Errors"  feature - how to?

    File sender adapter has a feature to  Archive Source Files with Errors.
    I have an adapter module applied to inbound files and in case an error occurs during the processing of the adapter module, I want to make use of this feature , this is because the CC keeps on picking the file with erroneous data after regular specified interval and shows up an error in RWB.
    How can I use the  Archive Source Files with Errors feature with this? Do I have to do anything specific in the adapter module code for this to work?
    Regards,
    Amol

    Hi,
    if you see whats mentioned on the help link
    http://help.sap.com/saphelp_nw04/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/frameset.htm
    it says:
    To archive source files where a permanent error occurred during processing, set the indicator.
    A permanent error occurs either during the conversion of the file content, or in a module in the module processor.
    does this not mean it could be used with errors raised in adapter modules? ideally it should be.

  • Cannot open pdf files with Firefox's built-in pdf viewer

    This just started (I think) with Firefox 37.01. This is on Win7-X64. I cannot open pdf files with the Firefox built-in pdf viewer. If I click on the file or try to open it from within Firefox, it brings up a "opening filename.pdf" message. If I select the "Open with" radio button as 'Firefox (default),' it just keeps looping on this process; it never opens. In Tools => Options => Applications, Portable Document Format (PDF) is indicated as 'Preview in Firefox.' I've never had any other PDF viewer installed on this computer. I've tried disabling all plug-ins and extensions, but it still doesn't work. I searched for solutions but haven't found any for this specific issue.
    Thanks for the help.

    Hello,
    Have you tried, to start Firefox in safemode you can do so by following these steps
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Cannot print PDF file with version 11.0.10 Adobe Reader.

    Cannot print PDF file with version 11.0.10 Adobe Reader.  Get error messages "This document could not be printed" and "There are no pages selected to print".  I am using a Mac OS Ver 10.0.2.  I see that this question has been asked by others recently, but no answers.  Anyone have any suggestions?

    Assuming you are running 10.10.2 and not the ancient 10.0.2, can you tell us what printer and printer driver you are using? How is the printer connected to the computer (network, usb)? See if you can delete the Reader preference files? Years ago I resetting the printer subsystem would sometimes cure a problem like this.

  • Wuala Validating source files with md5sums... wuala.tar.gz . FAILED

    [r-c@r-c-laptop wuala]$ makepkg -si
    ==> Making package: wuala 2-20110707 (Sat Oct 15 13:17:49 CEST 2011)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading wuala.tar.gz...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 303k 100 303k 0 0 56284 0 0:00:05 0:00:05 --:--:-- 684k
    -> Found 0001-fix-loader-location.patch
    -> Found wuala.png
    -> Found wuala.desktop
    -> Found LICENSE
    ==> Validating source files with md5sums...
    wuala.tar.gz ... FAILED
    0001-fix-loader-location.patch ... Passed
    wuala.png ... Passed
    wuala.desktop ... Passed
    LICENSE ... Passed
    ==> ERROR: One or more files did not pass the validity check!
    I tryed to install it mannualy and also using yaourt. Nothing works.

    What I need to change just checksums or something else? Which checskums to use?
    I tryed copy and paste during installation but doesnt work:
    http://pastebin.com/MceCxbD3
    http://pastebin.com/ziQKuE5t

Maybe you are looking for