Qt Moc Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about qt creator error 1 Stack Overflow the company Business Learn more about hiring developers or posting ads
Debug/moc_mainwindow.cpp Error 1
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow main.o error 1 is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Qt moc error 1 - what does it mean? up vote 3 down vote favorite 1 I'm trying to build a project on Mac OSX, and it's giving me a cryptic error: [moc_droparea.cpp] Error 1 droparea.cpp is (obviously) a file in the project. I checked that it exists in the project directory and is not corrupted. The file moc_droparea.cpp doesn't show up in the build folder after this error, so I'm assuming it's failing to build for whatever reason, but the error is too vague to help me figure out what's going on. Could anyone help me figure out what this means please? qt qt-creator share|improve this question edited Jun 4 '14 at 9:10 troyane 3,58342545 asked Aug 25 '10 at 18:46 CoutPotato 1751311 Would you mind posting the droparea.h file that gives the error when being moc'ed? –Fred Aug 25 '10 at 19:02 I can't actually post any of the source code unfortunately, the project is for work. However, the .h file is almost identical to the one found in the Drop Area example that comes with QT creator. –CoutPotato Aug 25 '10 at 19:12 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted The solution was annoyingly simple. I had a folder structure that put spaces (illegal characters) in the file path. I put underscores instead of spaces and it built fine. I would think the moc pre-processor could handle spaces in file names, but apparently not. I feel foolish, but at least the problem is solved now. Hopefully this solution can help someone else. share|improve this answer answered Aug 25 '10 at 19:24 CoutPotato 1751311 I had that problem before. Can you accept your ow
visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Welcome to Qt Centre. Qt Centre is a community site devoted to programming in C++ using the Qt framework. Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question. You are currently http://stackoverflow.com/questions/3569201/qt-moc-error-1-what-does-it-mean viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems http://www.qtcentre.org/threads/42787-Error-in-MOC-file with the registration process or your account login, please contact us. + Reply to Thread Results 1 to 5 of 5 Thread: Error in MOC file Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 28th June 2011,22:33 #1 Computer Hater View Profile View Forum Posts View Blog Entries View Articles Novice Join Date Nov 2010 Posts 63 Thanks 26 Thanked 1 Time in 1 Post Qt products Platforms Error in MOC file Hi, I have the following problem using Qt Creator: In my menu I added an option for testing actions associated with it. I removed the option again (I think I first removed the action from the Action Editor, then the menu option itself). Ever since then I've been getting a compiler error that is actually referring to the file "moc_mainwindow.cpp", so it's in an auto-generated file (see "moc file error.jpg"). I also removed some other actions from the Action Editor, but I only get an error for this one. AFAIK I have removed every remnant of that option from all visible elements in the design area (see "mainmenu desi
and spm Next message: [Mrtrix-discussion] MRTrix3 MacOSX installation: QT moc not found Messages sorted by: [ date ] [ thread ] [ subject ] http://www.nitrc.org/pipermail/mrtrix-discussion/2014-June/001026.html [ author ] Dear Helen, I'm not quite sure what's https://ez.analog.com/thread/10983 going on here, but I have definitely not had this issue and I'm not using macports. Some troubleshooting tips: 1. Make sure the QT tools are in your path, i.e., run "echo $PATH" and check that it contains something like ".../…/Qt5/5.2.0/clang_64/bin". error 1 * If it doesn't, add it permanently to the configuration file of your shell (~/.bashrc, ~/.tcshrc, ~/.profile, or …). If you use bash/zsh, that's "export PATH=/path/to/Qt5/5.2.0/clang_64/bin:$PATH", if you use csh/tcsh, that's "setenv PATH /path/to/Qt5/5.2.0/clang_64/bin:$PATH". (You can check which shell you're using by running "echo $0"). Also don't forget to reload the qt moc error config file ("source ~/.profile" or just restart the terminal). * If it does, then check if maybe it's conflicting with your macports installation. Try to make sure the path to your own QT installation is at the front of the $PATH variable, or at least before the path to your macports installation (/opt/local/bin). 2. If your path is correct, navigate to that directory ("cd") and check if moc is actually there ("ls"). If it's not, your QT install is broken and you should run the installer again. If it is, then ./configure should be able to find it. I hope that helps. Best regards, Daan ir. Daan Christiaens Ph.D. Researcher
and TimingData ConvertersDesign Tools and CalculatorsDirect Digital SynthesisEmbedded Vision SensingEnergy Monitoring and MeteringFPGA Reference DesignsInterface and IsolationLow Power RF TranceiversMEMS Inertial SensorsMotor Control Hardware PlatformsPower ManagementProcessors and DSPReference CircuitsRF and MicrowaveSwitches/MultiplexersTemperature SensorsVideoWide Band RF TransceiversWireless Sensor NetworksLog in0SearchSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page.More questions in Blackfin Processors Where is this place located?EngineerZoneAll PlacesProcessors and DSPBlackfin ProcessorsLog in to create and rate content, and to follow, bookmark, and share content with other members.AnsweredAssumed AnsweredGenerating "moc" files for Qt project (version of tools and library don't match)Question asked by skstrobel on Jan 12, 2012Latest reply on Jan 18, 2012 by skstrobel Like • Show 1 Like1 Comment • 6I have a Qt project that compiles and runs fine using Qt Creator under Windows 7 and Ubuntu. I am trying to also compile it for Blackfin. I can run qmake from the command line and specify the linux-bfin-fdpic-g++ and with some tweaking of the project and qmake.conf files get most of the files to compile. It chokes when it gets to the first "moc" (meta object compiler) file. Such moc files are automatically created from the header files by Qt. That works fine when the host and target platforms are the same (Windows or Ubuntu). The problem comes in when I try to use the include files from the Blackfin uClinux distribution's version of Qt (V4.5.1) but the Qt toolchain running on the Ubuntu host (which includes the moc compiler) is V4.6.2. I am getting error messages like this:moc_mainwindow.cpp:14:2: error: #error "This file was generated using the moc from 4.6.2. It"moc_mainwindow.cpp:15:2: error: #error "cannot be used with the include files from this version of Qt."moc_mainwindow.cpp:16:2: error: #error "(The moc has changed too much.)" So I am looking for the least-painful way of getting my Blackfin Qt library and moc compiler versions to match. I can try to find the older version of Qt Creator for Ubuntu and downgrade it, but it seems really tacky to make my Blackfin project depend on the version of IDE that is installed. Or I could try to up