Basically every time I try generate on CMake after successfully configuring it responds with a huge error line, I have read this but I don't understand what it means. I downloaded a GLFW file from the official GLFW website, (version 3.18). Please help me because I really want to learn OpenGL.
Cannot find source file:
clipboard.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:39 (add_executable):
Cannot find source file:
events.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:40 (add_executable):
Cannot find source file:
msaa.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:41 (add_executable):
Cannot find source file:
glfwinfo.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:42 (add_executable):
Cannot find source file:
iconify.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:43 (add_executable):
Cannot find source file:
monitors.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:44 (add_executable):
Cannot find source file:
reopen.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:45 (add_executable):
Cannot find source file:
cursor.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:47 (add_executable):
Cannot find source file:
empty.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:48 (add_executable):
Cannot find source file:
gamma.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:49 (add_executable):
Cannot find source file:
icon.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:50 (add_executable):
Cannot find source file:
inputlag.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:51 (add_executable):
Cannot find source file:
joysticks.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:54 (add_executable):
Cannot find source file:
threads.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:52 (add_executable):
Cannot find source file:
opacity.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:53 (add_executable):
Cannot find source file:
tearing.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:55 (add_executable):
Cannot find source file:
timeout.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:56 (add_executable):
Cannot find source file:
title.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:57 (add_executable):
Cannot find source file:
triangle-vulkan.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:58 (add_executable):
Cannot find source file:
windows.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at CMakeLists.txt:38 (add_executable):
No SOURCES given to target: clipboard
CMake Error at CMakeLists.txt:39 (add_executable):
No SOURCES given to target: events
CMake Error at CMakeLists.txt:40 (add_executable):
No SOURCES given to target: msaa
CMake Error at CMakeLists.txt:41 (add_executable):
No SOURCES given to target: glfwinfo
CMake Error at CMakeLists.txt:42 (add_executable):
No SOURCES given to target: iconify
CMake Error at CMakeLists.txt:43 (add_executable):
No SOURCES given to target: monitors
CMake Error at CMakeLists.txt:44 (add_executable):
No SOURCES given to target: reopen
CMake Error at CMakeLists.txt:45 (add_executable):
No SOURCES given to target: cursor
CMake Error at CMakeLists.txt:47 (add_executable):
No SOURCES given to target: empty
CMake Error at CMakeLists.txt:48 (add_executable):
No SOURCES given to target: gamma
CMake Error at CMakeLists.txt:49 (add_executable):
No SOURCES given to target: icon
CMake Error at CMakeLists.txt:50 (add_executable):
No SOURCES given to target: inputlag
CMake Error at CMakeLists.txt:51 (add_executable):
No SOURCES given to target: joysticks
CMake Error at CMakeLists.txt:54 (add_executable):
No SOURCES given to target: threads
CMake Error at CMakeLists.txt:52 (add_executable):
No SOURCES given to target: opacity
CMake Error at CMakeLists.txt:53 (add_executable):
No SOURCES given to target: tearing
CMake Error at CMakeLists.txt:55 (add_executable):
No SOURCES given to target: timeout
CMake Error at CMakeLists.txt:56 (add_executable):
No SOURCES given to target: title
CMake Error at CMakeLists.txt:57 (add_executable):
No SOURCES given to target: triangle-vulkan
CMake Error at CMakeLists.txt:58 (add_executable):
No SOURCES given to target: windows
How do I fix this, also here is the file I downloaded from GLFW for Visual Studio 2019.
File (not a rickroll, don't worry): http://www.mediafire.com/file/576nmghv6bbt36y/GLFW_Error_Files.zip/file
Related
I've looked through a number posts and cannot find a solution to this problem.
I installed the MMLanScan Objective C library into in my pod file successfully.
Then I created a bridging header file in my project directory
#ifndef BridingHeader_h
#define BridingHeader_h
#import "MMLANScanner.h"
#import "LANProperties.h"
#import "PingOperation.h"
#import "MMLANScanner.h"
#import "MACOperation.h"
#import "MacFinder.h"
#import "MMDevice.h"
#endif
I also set the header file path in my project's compiler settings
But when I build my app, I get two compile time errors
error 1:
MMLANScanner.h file not found
error 2:
Failed to emit precompiled header `/Users/my user name/Library/Developer/Xcode/Derived Data/My Project Name...
Both these errors disappear when I delete my imports from the bridging header file.
Any clues how to compile this library would be appreciated.
edit
So the required .h files appear to be in my pod directory, so not sure why I get these errors
So the solution was as simple as adding the relative folder path to the header file imports
#ifndef BridingHeader_h
#define BridingHeader_h
#import "MMLanScan/MMLANScanner.h"
#import "MMLanScan/LANProperties.h"
#import "MMLanScan/PingOperation.h"
#import "MMLanScan/MMLANScanner.h"
#import "MMLanScan/MACOperation.h"
#import "MMLanScan/MacFinder.h"
#import "MMLanScan/MMDevice.h"
#endif
not
#ifndef BridingHeader_h
#define BridingHeader_h
#import "MMLANScanner.h"
#import "LANProperties.h"
#import "PingOperation.h"
#import "MMLANScanner.h"
#import "MACOperation.h"
#import "MacFinder.h"
#import "MMDevice.h"
#endif
I successfully installed this Objective C library MMLanScan, successfully created a bridging header file, and successfully built my project without compile time errors.
But now when I extend from MMLANScannerDelegate I get a compile-time error, for example compiling this
class MyViewController: UIViewController, MMLANScannerDelegate {
// ...
}
results in this error
Use of undeclared type 'MMLANScannerDelegate'
Here is my bridging header file which I successfully compiled, so I'm not sure what the problem is
#ifndef BridingHeader_h
#define BridingHeader_h
#import "MMLanScan/MMLANScanner.h"
#import "MMLanScan/LANProperties.h"
#import "MMLanScan/PingOperation.h"
#import "MMLanScan/MMLANScanner.h"
#import "MMLanScan/MACOperation.h"
#import "MMLanScan/MacFinder.h"
#import "MMLanScan/MMDevice.h"
#endif
I have a project that is written in Objective-C and I am trying to add Swift to it. I have read several places that I can import my Project-Swift.h header in my Project-Prefix.pch. This works but I get a bunch of no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed warnings.
Am I doing something wrong or is it not possible to import the Project-Swift.h header in Project-Prefix.pch?
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "Project-Swift.h"
#endif
(a) The 4th parameter in the UIApplicationMain() method is the method:
NSStringFromClass()
(b) NSStringFromClass() is found in Foundation.h
(c) The only import into main.m is UIKit.h.
(d) As best I can tell, UIKit.h does not extend the Foundation.h
So, why am I not getting an error when I compile main.m? NSStringFromClass() should be an unrecognized method?
Have a look at the macro in the *prefix.pch file in your project supporting files ;-)
Foundation is imported in the precompiled header that comes standard with every Xcode project:
//
// Prefix header for all source files of the <x> target in the <x> project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
My *-Prefix.pch file looks like the following
//
// Prefix header for all source files of the 'stuff' target in the 'stuff' project
//
#import <Availability.h>
#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
So why is it then when I remove #import from a file in Xcode 4.6.2 all the syntax highlighting turns off for all Foundation Framework objects? The code still compiles and run correctly.